<style type="text/css">
    .bjui-pageHeader {
        font-size: 18px;
        font-weight: bold;
    }

    .form {
        padding: 15px;
    }

    .form dl {
        overflow: hidden;
        padding-top: 15px;
    }

    .form dt {
        color: #666;
        float: left;
        font-size: 14px;
        padding: 3px 0 0;
        width: 11%;
    }

    .form dd {
        float: left;
        line-height: 22px;
    }

    dd.desc {
        height: 30px;
        padding: 0 10px;
        width: 150px;
    }

    fieldset {
        margin-top: 5px;
        margin-left: 5px;
        padding: 5px;
    }
</style>
<div class="bjui-pageHeader">
    <!-- 分页使用FORM -->
    <form action="{:U('Wechat/words')}" method="post" novalidate="novalidate" data-toggle="ajaxsearch" id="pagerForm">
    <!-- 分页使用FORM -->
    <!-- -->
        <input type="hidden" value="15" name="pageSize">
        <input type="hidden" value="{$nowPage}" name="pageCurrent">
        <input type="hidden" value="id" name="orderField">
        <input type="hidden" value="desc" name="orderDirection">
        <div class="bjui-searchBar">
            <button type="button" data-url="{:U('Wechat/awords')}" class="btn btn-default" data-toggle="dialog" data-id="Wechat-awords" data-title="添加关键字" data-width="560" data-height="400" data-icon="plus">添加关键字
            </button>
            <button type="button" data-url="{:U('Wechat/atuwen')}" class="btn btn-default" data-toggle="dialog" data-id="Wechat-atuwen" data-title="添加图文素材" data-width="560" data-height="400" data-icon="plus">添加图文素材
            </button>

            <button type="button" class=" btn-default" data-icon="remove" data-confirm-msg="确实要删除选择项吗？" data-toggle="doajax" data-url="{:U('Wechat/del')}?id={#bjui-selected}&batchFlag=1">删除</button>
            关键字：<input type="text" name="keyword" class="form-control" title="关键字" value="{$keyword}">
            <button data-icon="search" class="btn btn-default" type="submit">查询</button>
            <a data-icon="undo" data-clear-query="true" data-toggle="reloadsearch" href="javascript:;" class="btn btn-orange">清空查询</a>
            <div class="pull-right">
                <div class="alert alert-warning form-inline"><i class="fa fa-warning"></i> <strong> 如果关键字类似，则返回按照排序降序返回1条数据。</strong></div>
               
            </div>
        </div>
    </form>

</div>
<div class="bjui-pageContent">

    <form id="form_do" action="{:U('Auth/delGroupHandle')}" method="post" data-toggle="validate">
        <table class="table table-bordered table-hover table-striped table-top" data-selected-multi="true">
            <thead>
            <tr>
                <th>标题</th>
                <th>关键字</th>
                <th>回复内容</th>
                <th>排序</th>
                <th>创建时间</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <foreach name='vlist' item='v'>
                <tr data-id="{$v.id}">

                    <td>
                                {$v.title}<if condition="$v['iszidong'] eq 1"><font color="blue">[自动]</font></if><if condition="$v['isnews'] eq 1"><font color="red">[图文]</font></if>
                            </td>
                            <td>{$v.keywords}</td>
                            <td>{$v.content|str2sub='100','1'}</td>
                            <td><input type="text" name="{$v.id}" value="{$v.sort}" /></td>
                            <td>{$v.publictime|date='Y-m-d H:i:s', ###}</td>
                            
                            <td>
                            <if condition="$v['isnews'] eq 0">
                                <a id="look" href="{:U('Wechat/awords',array('id' => $v['id'],'action'=>'edit'))}" data-toggle="dialog" data-id="Wechat-awords-edit" data-title="编辑关键字" data-width="560" data-height="400" >编辑</a> 
                            <else/>
                                <a id="look" href="{:U('Wechat/atuwen',array('id' => $v['id'],'action'=>'edit'))}" data-toggle="dialog" data-id="Wechat-atuwen-edit" data-title="编辑关键字" data-width="560" data-height="400">编辑</a>
                            </if>
                             
                                <a href="{:U('Wechat/del',array('id' => $v['id']))}" data-toggle="doajax"
                               data-confirm-msg="确定要删除吗？" data-type="get">删除</a>
                            </td>
                </tr>
            </foreach>
            </tbody>
        </table>
    </form>
</div>
<div class="bjui-pageFooter">
    <div class="pages">
        <span>每页&nbsp;</span>

        <div class="selectPagesize">
            <select data-toggle="selectpicker" data-toggle-change="changepagesize">
                <option value="15">15</option>
                <option value="30">30</option>
                <option value="60">60</option>
                <option value="100">100</option>
            </select>
        </div>
        <span>&nbsp;条，共 {$totalRows} 条</span>
    </div>

    <div class="pagination-box" data-toggle="pagination" data-total="{$totalRows}" data-page-size="15"
         data-page-current="{$nowPage}"></div>


</div>